﻿using ODataPQ.Tests.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace ODataPQ.Tests.Controllers
{
    public class ODataPQController : ApiController
    {
        private Tests.Models.TestDbDataContext dbContext = new Models.TestDbDataContext();

        /// <summary>
        /// 在需要分页数据的Action上加上
        /// ODataPQ.ODPageResultAttribute 就可以了。
        /// </summary>
        /// <returns></returns>
        [ODPageResult]
        public IQueryable<ST_Users> Get()
        {
            return dbContext.ST_Users.AsQueryable();
        }
    }
}